
env = Environment()

import distutils.sysconfig, os
vars = distutils.sysconfig.get_config_vars('CC', 'CXX', 'OPT', \
                        'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO')
for i in range(len(vars)):
    if vars[i] is None:
        vars[i] = ""
(cc, cxx, opt, basecflags, ccshared, ldshared, so_ext) = vars

env.AppendUnique(CPPPATH=[distutils.sysconfig.get_python_inc()])
env.AppendUnique(CFLAGS=['-g'])

lib = env.SharedLibrary(target='simpy',
                source=['simpymod.c'])

env.Command('simpy.so','libsimpy.so',
            [
                Move("$TARGET","$SOURCE"),
            ])

env.Alias('simpymod','simpy.so')

